// pages/detail/detail.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    isLike: true,
    // banner
    imgUrls: [
      "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&di=4fc55245daffa7c126c1694bc732861c&imgtype=0&src=http%3A%2F%2Fimg1.juimg.com%2F180706%2F330686-1PF603200066.jpg",
      "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&di=4fc55245daffa7c126c1694bc732861c&imgtype=0&src=http%3A%2F%2Fimg1.juimg.com%2F180706%2F330686-1PF603200066.jpg",
      "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&di=4fc55245daffa7c126c1694bc732861c&imgtype=0&src=http%3A%2F%2Fimg1.juimg.com%2F180706%2F330686-1PF603200066.jpg",
      "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&di=4fc55245daffa7c126c1694bc732861c&imgtype=0&src=http%3A%2F%2Fimg1.juimg.com%2F180706%2F330686-1PF603200066.jpg",
      "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&di=4fc55245daffa7c126c1694bc732861c&imgtype=0&src=http%3A%2F%2Fimg1.juimg.com%2F180706%2F330686-1PF603200066.jpg"
    ],
    indicatorDots: true, //是否显示面板指示点
    autoplay: true, //是否自动切换
    interval: 3000, //自动切换时间间隔,3s
    duration: 1000, //  滑动动画时长1s

    // 商品详情介绍
    detailImg: [
      "http://7xnmrr.com1.z0.glb.clouddn.com/detail_1.jpg",
      "http://7xnmrr.com1.z0.glb.clouddn.com/detail_2.jpg",
      "http://7xnmrr.com1.z0.glb.clouddn.com/detail_3.jpg",
      "http://7xnmrr.com1.z0.glb.clouddn.com/detail_4.jpg",
      "http://7xnmrr.com1.z0.glb.clouddn.com/detail_5.jpg",
      "http://7xnmrr.com1.z0.glb.clouddn.com/detail_6.jpg",
    ]
  },
  //预览图片
  previewImage: function (e) {
    var current = e.target.dataset.src;

    wx.previewImage({
      current: current, // 当前显示图片的http链接  
      urls: this.data.imgUrls // 需要预览的图片http链接列表  
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: 'LANCOME兰蔻小黑瓶精华肌底液'
    })

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})